<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateInfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('infos', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('title',10)->comment('通知标题');
            $table->string('content',32)->comment('通知内容');
            $table->string('owner',32)->comment('通知归属者openID');
            $table->unsignedTinyInteger('type')->comment('通知类别 0-订单提示 | 1-收入提示 | 2-其他');
            $table->unsignedTinyInteger('status')->default('0')->comment('通知状态 0-未查看|1-已查看');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('infos');
    }
}
